<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <ui:composition>
        <h:form style="text-align: center; font-size: 90%;">
            <f:view locale="#{locale.locale}" >

                <div style="margin-top: 30px;" />
                <h:form > 

                    <ui:repeat var="item" value="#{comment.allComments}" varStatus="status" rendered="#{viewer.activeComments}">
                        <p:panel id="pnl" header="#{user.findUser(item.autorId).name}:" 
                                 toggleable="true" closable="true" toggleSpeed="500" closeSpeed="500" 
                                 widgetVar="panel-#{item.id}" style="margin-bottom: 20px;">  


                            <h:outputText value="#{item.content}" />  

                        <f:facet name="options">  
                            <p:menu>  
                                <p:submenu label="Settings">  
                                    <p:menuitem value="#{trans.b_collapse}" url="#" icon="ui-icon-newwin" onclick="panel-#{item.id}.toggle()"/>  
                                    <p:menuitem value="Remove" url="#" icon="ui-icon-close" onclick="panel-#{item.id}.close()"/>  
                                </p:submenu>  
                            </p:menu>  
                        </f:facet>  
                    </p:panel> 
                        
                        </ui:repeat>

                </h:form>

            </f:view>
        </h:form>
    </ui:composition>

</html>

